﻿using Abp;
using Abp.Configuration.Startup;
using Abp.Events.Bus;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace AbpRabbitMqAppOne
{
    class Program
    {
        static void Main(string[] args)
        {
            var abpBoot = AbpBootstrapper.Create<RabbitMqTestAppOneModule>();
            abpBoot.Initialize();

            var eventbus = abpBoot.IocManager.Resolve<IEventBus>();

            eventbus.Trigger(new TestEventData());


            Thread.Sleep(10*1000);

            eventbus.Trigger(new TestEventData() {
                Message="10秒后的事件"
            });

            Console.WriteLine("输入任意键返回...");
            Console.ReadKey(true);
        }
    }
}
